Dekoratives Banner

Operators


    Table 5.2 lists and describes all operators recognized by the After Effects scripting engine. Table 5.3 shows the precedence and associativity for all operators.

    Table  2 Description of Operators

    Operators

    Description

    new

    Allocate object.

    delete

    Deallocate object.

    typeof

    Returns data type.

    void

    Returns undefined value.

    .

    Structure member.

    []

    Array element.

    ()

    Function call.

    ++

    Pre- or post-increment.

    --

    Pre- or post-decrement.

    -

    Unary negation or subtraction.

    ~

    Bitwise NOT.

    !

    Logical NOT.

    *

    Multiply.

    /

    Divide.

    %

    Modulo division.

    +

    Add.

    <<

    Bitwise left shift.

    >>

    Bitwise right shift.

    >>>

    Unsigned bitwise right shift.

    <

    Less than.

    <=

    Less than or equal.

    >

    Greater than.

    >=

    Greater than or equal.

    ==

    Equal.

    !=

    Not equal.

    &

    Bitwise AND.

    ^

    Bitwise XOR.

    |

    Bitwise OR.

    &&

    Logical AND.

    ||

    Logical OR.

    ?:

    Conditional (ternary).

    =

    Assignment.

    +=

    Assignment with add operation.

    -=

    Assignment with subtract operation.

    *=

    Assignment with multiply operation.

    /=

    Assignment with divide operation.

    %=

    Assignment with modulo operation.

    <<=

    Assignment with bitwise left shift operation.

    >>=

    Assignment with bitwise right shift operation.

    >>>=

    Assignment with bitwise right shift unsigned operation.

    &=

    Assignment with bitwise AND operation.

    ^=

    Assignment with bitwise XOR operation.

    |=

    Assignment with bitwise OR operation.

    ,

    Multiple evaluation.

    Table  3 Operator Precedence

    Operators (Listed from highest precedence --top row--to lowest)

    Associativity

    [], (), .

    left to right

    new, delete, -(unary negation), ~, !, typeof, void,++, --

    right to left

    *, /, %

    left to right

    +, -(subtraction)

    left to right

    <<, >>, >>>

    left to right

    <, <=, >, >=

    left to right

    ==, !=

    left to right

    &

    left to right

    ^

    left to right

    |

    left to right

    &&

    left to right

    ||

    left to right

    ?:

    right to left

    =, /=, %=, <<=, >>=, >>>=, &=, ^=, |=, +=, -=, *=

    right to left

    ,

    left to right